|
|
|
|
|
|
|
Projection Onto an Arbitrary Plane |
|
|
|
|
|
|
|
|
Using similar steps, you can create a transformation matrix that represents parallel or perspective projection onto an arbitrary plane. One simple way to specify a projection system is to give a focus point and the center of projection or eye. The focus point is some point of interest that you want to view. The plane of projection passes through the focus point. The normal to the plane of projection is given by the vector from the focus point to the center of projection. Figure 13.31 shows a viewing system specified in this way. |
|
|
|
|
|
|
|
|
Using this specification, you can follow these steps to perform the projection: |
|
|
|
|
|
|
|
|
1. Translate the focus to the origin. |
|
|
|
|
|
|
|
|
2. Rotate around the Y axis to place the center of projection in the Y-Z plane. |
|
|
|
|
|
|
|
|
3. Rotate around the X axis until the center of projection lies on the Z axis. |
|
|
|
|
|
|
|
|
4. Project (parallel or perspective) along the Z axis onto the X-Y plane. |
|
|
|
|
|
|
|
|
The goal of steps 2 and 3 is to rotate the center of projection into the Z axis. These instructions rotate around the center of projection into the Y-Z plane and then rotate it into the Z axis, but there are other ways you can achieve the same result. For example, you could rotate the center of projection into the X-Z plane and then rotate it into the Z axis. Or you could rotate around a line that moved the center of projection directly into the Z axis. |
|
|
|
|
|
|
|
|
Figure 13.32 shows these three possibilities. The top pictures show a point on a triangle being rotated into the Z axis. The bottom pictures show the corresponding projections onto the X-Y plane. Each of the three methods moves the selected point to the same position on the Z axis. Other points, however, are not necessarily moved to the same locations by each transformation. This means the three orders of rotation give three different projections. |
|
|
|
|
|
|
|
|
Figure 13.31
Specifying a viewing system with a
focus point and a center of projection. |
|
|
|
|
|